<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/6/10
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎来到管理员界面</title>
    <link rel="stylesheet" type="text/css" href="/static/css/admin_main.css">
    <link rel="stylesheet" type="text/css" href="/static/css/stu_main.css">
    <script type="text/javascript" rel="script" src="/static/js/jq.js"></script>
    <script type="text/javascript" rel="script" src="/static/js/stu_main.js"></script>
</head>
<body>
<div class="navigator">
    <div class="title">
        <p>Manage</p>
    </div>
    <div class="admin_manage">
        <p>学生</p>
    </div>
</div>
<div class="main_con">
    <div class="header">
        <p>ChenforCode图书馆管理系统</p>
        <a href="/login/doLogout">退出登陆</a>
    </div>
    <div class="content">
        <div class="info">
            <h3>所有书籍信息</h3>
            <a>当前用户信息：</a>
            <span>用户名：${stu_stu.sno}</span>
            <span>可借总量：${stu_stu.total}</span>
            <span>已借数量：${stu_stu.have}</span>
            <span>余额：${stu_stu.balance}</span>
            <form class="add_form" action="/student/add">
                <input type="text" class="add_count" name="add">
                <input type="button" class="add_bt" value="充值">
            </form>
            <table class="gridtable">
                <tr>
                    <td>书号</td>
                    <td>书名</td>
                    <td>作者</td>
                    <td>出版社</td>
                    <td>总量</td>
                    <td>剩余</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${stu_books}" var="b">
                    <tr>
                        <td>${b.bno}</td>
                        <td>${b.bname}</td>
                        <td>${b.author}</td>
                        <td>${b.pbhouse}</td>
                        <td>${b.total}</td>
                        <td>${b.still}</td>
                        <td>
                            <a href="/student/bor?id=${b.bno}" onclick='return confirm("确定借书吗？")'>借书</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <h3>已借书籍信息</h3>
            <table class="gridtable">
                <tr>
                    <td>书号</td>
                    <td>书名</td>
                    <td>作者</td>
                    <td>出版社</td>
                    <td>总量</td>
                    <td>剩余</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${stu_books_noret}" var="bn">
                    <tr>
                        <td>${bn.bno}</td>
                        <td>${bn.bname}</td>
                        <td>${bn.author}</td>
                        <td>${bn.pbhouse}</td>
                        <td>${bn.total}</td>
                        <td>${bn.still}</td>
                        <td>
                            <a href="/student/ret?id=${bn.bno}" onclick='return confirm("确定还书吗？")'>还书</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <span>${sessionScope.bor_msg}</span>



        </div>
    </div>
</div>
</body>
</html>
